/*!
 * Title: axios配置
 */


/**
 * 服务端地址
 */
 //const server_path = 'http://192.168.50.111:8089/data-platform/';
const server_path = 'http://192.168.50.174:8080/xbpm/';

/**
 * 配置代理地址
 */
const proxys = {
   //'/api': ['http://192.168.50.111:8089/data-platform']
   '/api': ['http://192.168.50.174:8080/xbpm']
};

/**
 * 获取代理地址配置
 */
module.exports.getProxys = function () {
  let r = {};
  for (let i in proxys) {
    r[i] = {
      target: proxys[i][0],
      changeOrigin: true,
      pathRewrite: function () {
        let pr = {};
        let v = '';
        for (let j = 1; j < proxys[i].length; j++) {
          v += proxys[i][j];
        }
        pr[`^${i}`] = v;
        return pr;
      }()
    }

  }
  return r;
};
/**
 * 获取接口路径
 */
module.exports.getBaseUrl = function () {
    return server_path;
};
